create external table jms_dm.dm_terminal_station_brand_sum_dt
(
final_plan_sign_date   date COMMENT '规划签收日期' ,
end_agent_code   string COMMENT '末端代理区code' ,
end_agent_name  string COMMENT '末端代理区' ,
end_franchisee_code  string COMMENT '末端加盟商code' ,
end_franchisee_name   string COMMENT '末端加盟商' ,
final_sign_network_code   string COMMENT '末端网点code' ,
final_sign_network_name   string COMMENT '末端网点' ,
terminal_source   string COMMENT '对接终端来源' ,
need_sign_cnt   bigint COMMENT '总单量' ,
deliver_1_cnt   bigint COMMENT '一派总量' ,
deliver_2_cnt   bigint COMMENT '二派总量' ,
aging_sign_22_count bigint COMMENT '时效签收22点前签收汇总' ,
deliver_one_aging_sign_22_count bigint COMMENT '时效签收22点前签收汇总' ,
deliver_two_aging_sign_22_count bigint COMMENT '时效签收22点前签收汇总' ,
collect_in_cnt   bigint COMMENT '入库量' ,
collect_out_cnt   bigint COMMENT '出库量' ,
unfinished_count   bigint COMMENT '未完结量' ,
date_time   date COMMENT '业务日期',
is_township int comment '是否乡镇')
comment '末端驿站汇总表'
PARTITIONED BY ( dt string COMMENT '时间分区')
stored as parquet
LOCATION '/dw/hive/jms_dm.db/external/dm_terminal_station_brand_sum_dt'
TBLPROPERTIES (     'discover.partitions' = 'false',  'parquet.column.index.access' = 'true');


alter table jms_dm.dm_terminal_station_brand_sum_dt add columns (
    actual_sign_22_count int comment'实际签收22前点签收量'
    )cascade;